package cn.charmaine.org.domain;

import cn.charmaine.basic.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mysql.fabric.xmlrpc.base.Array;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Department extends BaseDomain {
    private String sn;//部门编号
    private String name;//部门名称
    private String dirPath;//部门的上级分类层级id
    private Integer state;//部门状态,0正常，1禁用

    private Long manager_id; //部门管理员id,关联Employee表id
    private Employee manager;//管理员 null

    private Long parent_id;//上级部门id
    private Department parent;//上级部门 null

    //新增部门集合-当前部门的儿子

    @JsonInclude(JsonInclude.Include.NON_EMPTY)//集合为空不显示的注解
    List<Department> children = new ArrayList<>();
}
